/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.etop.beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author cjh(358319110@qq.com)
 */
@Entity
@Table(name = "goods")
public class Goods {

    private int id;                     //物品的id
    private String name;                //物品的名字
    private String description;         //对物品的描述

    public Goods() {
    }

    public Goods(int id, String name, String description) {
        this.id = id;
        this.name = name;
        this.description = description;
    }

    @Column(name = "description")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Id
    @GeneratedValue
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Goods{" + "id=" + id + ", name=" + name + ", description=" + description + '}';
    }

}
